{extend name="manager@common/base"}
{block name="page-content-main"}
<!--
  ~ Copyright (c) 2018-2019.
  ~  This file is part of the moonpie production
  ~  (c) johnzhang <875010341@qq.com>
  ~  This source file is subject to the MIT license that is bundled
  ~  with this source code in the file LICENSE.
  -->
<div class="am-u-sm-12">
    <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black">
        <thead>
        <tr>
            <th>模板ID</th>
            <th>标题</th>
            <th>一级分类</th>
            <th>二级分类</th>
            <th>模板数据</th>
            <th>模板示例</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="data_provider->getModels()" id="vo" empty="<tr><td colspan='7' class='am-text-center'>暂无记录</td></tr>"}
        <tr>
            <td class="am-text-middle">{$vo.template_id}</td>
            <td class="am-text-middle">{$vo.title}</td>
            <td class="am-text-middle">{$vo.primary_industry}</td>
            <td class="am-text-middle">{$vo.deputy_industry}</td>
            <td class="am-text-middle">{$vo.content}</td>
            <td class="am-text-middle">{$vo.example}</td>
            <td class="am-text-middle">
                <div class="tpl-table-black-operation">
                    <a href="{:url($try_uri, ['account_id' => $account_id, 'tmpl_id' => $vo.template_id])}">测试发送</a>
                </div>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>
<div class="am-u-lg-12 am-cf">
    <div class="am-fr">{$data_provider->getPagination()->render()}</div>
    <div class="am-fr pagination-total am-margin-right">
        <div class="am-vertical-align-middle">总记录：{$data_provider->getPagination()->total()}</div>
    </div>
</div>
{/block}
